#ifndef EXPORTXLSX_H
#define EXPORTXLSX_H

#include <QObject>
#include "tinyxml2.h"
#include "classmate.h"
#include <QRunnable>

class exportxlsx : public QObject,public QRunnable
{
    Q_OBJECT
public:
    enum LANG{
        Zh,
        En
    };
    explicit exportxlsx(QObject *parent = nullptr);
    int create(const ClassMate &aFile);
    int createEn();
    void setClassMateList(const ClassMate &aFile);
    void setLang(LANG langName);
protected:
    void run();
signals:
    void end();
    void idle();
public slots:

private:
    tinyxml2::XMLDocument doc;
    tinyxml2::XMLElement *root;
    QList<ClassMate> classMateList;
    LANG lang;
};

#endif // EXPORTXLSX_H
